<template>
	<div style="text-align: center;padding: 0.2rem;">
		<input type="button" value="获取接口数据" @click="getData" />
	</div>
</template>

<script>
	import { mapState } from 'vuex'
	export default {
		name: 'test',
		computed: {
			...mapState({})
		},
		methods: {
			getData: function() {
				let url = 'http://wzrm.vxinghe.com/m/index.php?c=home&a=detail&json=1&id=3894&callback=_jsonp6ot5lz64eg'
				this.$http.jsonp(url).then(function(response) {
					let data = response.data
					console.log(data)
				}).catch(function(response) {
					console.log(response)
				})
			}
		},
		created: function() {

		}
	}
</script>